<template>
    <div>
        <!-- 问答详情 -->
        <!-- 顶部 -->
        <div class="head">
            <div class="head-div" style="width: 56%;">
                <div class="head-left">
                    <img src="../assets/tpleft.svg" alt="" @click="previous" />
                    <div></div>
                    <img src="../assets/tpright.svg" alt="" @click="homes" />
                </div>
                <div class="head-text">问答详细</div>
            </div>
        </div>
        <!-- 内容 -->
        <div id="top">
            <div class="con">
                {{ wendaiditem.content }}
            </div>
            <div class="xinxi">
                <div>
                    <img class="portrait" :src="`https://wwz.jingyi.icu${wendaiditem.avatar}`" alt="" />
                    <span class="name">{{ wendaiditem.name }}</span>
                </div>
                <div class="times">
                    发布于 {{ wendaiditem.create_time }}
                </div>
            </div>
        </div>
        <!-- 评论渲染区域 -->
        <h6 id="num">全部回答(4)</h6>
        <div id="box_max">
            <div class="box_one">
                <div class="box_one_ana">
                    <div class="box_one_ana_child">
                        <img class="imgea" src="../assets/ren.jpeg" alt="" />
                        <p>分过无痕</p>
                        <p>07:22</p>
                    </div>
                    <div class="box_one_ana_two">
                        <img class="imggggg" src="../assets/love.png" alt="" />
                        <span>999</span>
                    </div>
                </div>
                <!-- 下 -->
                <div>
                    你是在那个地方?我们该如何帮助你呢?
                </div>
            </div>

        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
// 攻略一行
const wendaiditem = JSON.parse(sessionStorage.getItem('wendaiditem'))
console.log(wendaiditem, '问答一行数据');
// 返回到上一页
const previous = () => {
    router.push({
        name: "Strategy",
    });
}
// 返回到首页
const homes = () => {
    router.push({
        name: "home",
    });
}
</script>

<style scoped>
    * {
	margin: 0;
	padding: 0;
}
/* 顶部返回 */
.head-left div {
	background-color: rgba(153, 153, 153, 1);
	width: 1px;
	height: 2.5vh;
}

.head {
	width: 100%;
	background-color: white;
	padding-bottom: 6.5px;
	padding-top: 6.5px;
	height: 45px;
	border-bottom: 1px solid #e5e5e5;
}

.head-text {
	font-size: 13px;
	color: rgba(80, 80, 80, 1);
}

.head-left img {
	width: 3vh;
	height: 3vh;
}

.head-left {
	display: flex;
	align-items: center;
	justify-content: space-around;
	border-radius: 3vh;
	height: 25px;
	width: 10vh;
	border: 1px solid #e2e2e2;
}

.head-div {
	padding-left: 2vh;
	width: 51%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
/* <!-- 内容 --> */
#top {
	width: 92%;
	height: 90px;
	padding: 3% 4%;
	font-size: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border-bottom: 1px solid #e6e6e6;
}

.xinxi img {
	width: 35px;
	height: 35px;
	border-radius: 25px;
	margin-right: 10px;
}

.xinxi {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.xinxi>div {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
/* <!-- 评论渲染区域 --> */
#num {
	margin-left: 3%;
	margin-top: 3%;
	margin-bottom: 2%;
}

.box_one {
	width: 92%;
	height: 90px;
	padding: 3% 4%;
	font-size: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border-bottom: 1px solid #e6e6e6;
}

.imgea {
	width: 35px;
	height: 35px;
	border-radius: 25px;
}

.box_one_ana {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.imggggg {
	width: 20px;
	height: 20px;
}

.box_one_ana_child {
	width: 40%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.box_one_ana_two {
	display: flex;
	align-items: center;
}
</style>